/**
 * 
 */
package de.eridea.learning.java.usermanagement.logic.to;

/**
 * @author frank
 * 
 */
public class GroupDataImpl implements GroupData, GroupDataEditable,
		GroupDataLinked {

	private final String groupName;
	private UserData owner;

	public GroupDataImpl(String groupName) {
		if (groupName == null) {
			throw new NullPointerException("groupName must not be null");
		}
		this.groupName = groupName;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * de.eridea.learning.java.usermanagement.logic.to.GroupData#getGroupName()
	 */
	public String getGroupName() {
		return groupName;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see de.eridea.learning.java.usermanagement.logic.to.GroupData#getOwner()
	 */
	public UserData getOwner() {
		return owner;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * de.eridea.learning.java.usermanagement.logic.to.GroupData#setOwner(de
	 * .eridea.learning.java.usermanagement.logic.to.UserData)
	 */
	public void setOwner(UserData owner) {
		if (owner == null) {
			throw new NullPointerException("owner must not be null");
		}
		this.owner = owner;

	}

}
